#!/usr/bin/Rscript --vanilla

options(digits=4)
# very important!
Sys.setenv(TZ="UTC")

# load required packages
library("candlesticks")
library("vadb")
library("cssupport")
library("vola")


args <- commandArgs(TRUE)
args

# store .csv file with signals in this folder
folder="/home/voellenk/doji/dailysignal/"

# scrutinize price data for signals
dailySignals <- strategySignals()

# store dailySignals as csv file in folder
write.csv(dailySignals, file=paste(folder, Sys.Date(), "_signals", ".csv", sep=""))
write.csv(dailySignals, file=paste(folder, Sys.Date(), "_signals", ".txt", sep=""))

q()